//
//  Kylin_BuyViewController.m
//  01-LotteryBaseFrame
//
//  Created by Kylin on 16/1/5.
//  Copyright © 2016年 kylin. All rights reserved.
//

#import "Kylin_BuyViewController.h"
#import "Kylin_Button.h"


@interface Kylin_BuyViewController ()

@property (nonatomic,weak) UIButton *button;
@end

@implementation Kylin_BuyViewController
- (void)dealloc{
    
//    NSLog(@"%s",__func__);
    
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
 
    // 设置 titleView
    UIButton *button =[[Kylin_Button alloc]init];
    
    self.button = button;
    
    [button setTitle:@"全部彩种" forState:UIControlStateNormal];
    [button setImage:[UIImage imageNamed:@"YellowDownArrow"] forState:UIControlStateNormal];
    
    [button sizeToFit];
    
    self.navigationItem.titleView = button;
    
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    // 不能直接赋值
//    self.button.imageView.image = [[UIImage alloc]init];
    
    // 通过set方法设置,
//    [self.button setImage:[[UIImage alloc]init] forState:UIControlStateNormal];
}



@end
